<!-- * 文件名：通知公告
* 作者：ZQK
* 描述：〈描述〉
* 修改人：ZQK
* 修改时间：2025-3-9  -->
<template>
	<view class="myUsers">
		<view class="content">
			<PageScrollView
				ref="PageScrollViewRef"
				:init-param="param"
				@send-data="loadData"
				:scrollAuto="false"
				:isPropsChange="false">
				<view class="list">
					<view class="" v-for="(item, index) in list" :key="index">
						<view class="item" @click="handleDetail(item)">
							<view class="itemTop">
								<view class="itemTopText">{{item.noticeTitle}}</view>
							</view>
							<view class="itemBottom">
								<view class="itemBottomContent">{{item.noticeContent}}</view>
								<view class="itemBottomContent">{{item.createTime}}</view>
							</view>
						</view>
					</view>
				</view>
			</PageScrollView>
		</view>
	</view>
</template>

<script setup lang="ts">
	import { reactive, ref } from 'vue'
	import { onShow, onLoad } from "@dcloudio/uni-app"
	import subsection from '@/components/subsection/index.vue'
	import PageScrollView from '@/components/pageScrollView/index.vue'
	import { getUrl } from '@/utils/imagePlugin'
	import Api from '@/api/modules/home.ts'
	
	
	const PageScrollViewRef = ref()
	const list = ref<Array<any>>([])
	let param = ref<any>({
		api: Api.getNoticeList,
		param: {
			
		}
	})
	const loadData = (e: any) => {
		list.value = e
	}
	const getList = () => {
		list.value = []
		PageScrollViewRef.value.downCallback()
	}
	
	const handleDetail = (item: any) => {
		uni.navigateTo({
			url: '/pages/noticeDetail/noticeDetail?id=' + item.noticeId
		})
	}
	onLoad(()=>{
		setTimeout(()=>{
			getList()
		}, 20)
		// getUserRevenueList()
	})
</script>

<style lang="scss" scoped>
	.myUsers{
		background: #5EB847;
		display: flex;
		flex-direction: column;
		height: 100vh;
		
		.content{
			background: #ffffff;
			border-radius: 32rpx 32rpx 0rpx 0rpx;
			margin-top: 16rpx;
			padding-top: 30rpx;
			flex: 1;
			overflow: auto;
			
			.list{
				.item{
					background-color: #ffffff;
					border: 1rpx solid #ccc;
					border-radius: 16rpx;
					margin: 0 28rpx 30rpx;
					
					.itemTop{
						padding: 10rpx 20rpx;
						border-bottom: 1rpx solid #ccc;
						
						.itemTopText{
							
						}
					}
					
					.itemBottom{
						font-size: 24rpx;
						color: #7a7a7a;
						padding: 10rpx 20rpx;
						
						.itemBottomContent{
							max-height: 100rpx;
							overflow : hidden;
							text-overflow: ellipsis;
							display: -webkit-box;
							-webkit-line-clamp: 2;
							-webkit-box-orient: vertical;
						}
					}
				}
			}
		}
	}
</style>